Subject: Editor's draft DLSw spec (7 of 8)

From: "Alan K. Bartky, Manager of Technology" <[email-masked]>
Date: Mon, 11 Jul 94 13:42:24 PDT

----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 1
X-Sun-Content-Length: 22

Here is part 7 of 8.

----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: dlsw7.txt
X-Sun-Content-Lines: 478
X-Sun-Content-Length: 25493

RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

4.2.2.8 CONNECTED State

      +----------------------+---------------------+----------------------+
      |        Event         |      Action(s)      |      Next State      |
      +----------------------+---------------------+----------------------+
      | Receive HALT_DL      | DLC_HALT_DL         | HALT_PENDING         |
      +----------------------+---------------------+----------------------+
   1  | Receive HALT_DL_NOACK| DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+
      | Receive RESTART_DL   | DLC_HALT_DL         | RESTART_PENDING      |
      +----------------------+---------------------+----------------------+
      | Receive DGRMFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
      | Receive INFOFRAME    | DLC_INFO            |                      |
      +----------------------+---------------------+----------------------+
      | Receive DATAFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
   3  | Receive XIDFRAME     | If non-activation   |                      |
   3  |                      | XID3:               |                      |
   3  |                      |   DLC_XID           |                      |
   3  +----------------------+---------------------+----------------------+
   1  | Receive ICANREACH    | Send HALT_DL_NOACK  |                      |
      +----------------------+---------------------+----------------------+
   1  | Receive NETBIOS_NR   | Send HALT_DL_NOACK  |                      |
      +----------------------+---------------------+----------------------+
   1  | Receive ENTER_BUSY   | DLC_ENTER_BUSY      |                      |
      +----------------------+---------------------+----------------------+
   1  | Receive EXIT_BUSY    | DLC_EXIT_BUSY       |                      |
      +----------------------+---------------------+----------------------+
   1  | Rec TEST_CIRCUIT_REQ | Snd TEST_CIRCUIT_RSP|                      |
      +----------------------+---------------------+----------------------+
      | DLC_RESET            | Send RESTART_DL     | CIRCUIT_RESTART      |
      +----------------------+---------------------+----------------------+
      | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
      +----------------------+---------------------+----------------------+
      | DLC_DGRM             | Send DGRMFRAME      |                      |
      +----------------------+---------------------+----------------------+
      | DLC_INFO             | Send INFOFRAME      |                      |
      +----------------------+---------------------+----------------------+
   3  | DLC_XID              | If non-activation   |                      |
   3  |                      | XID3:               |                      |
   3  |                      |   Send XIDFRAME     |                      |
   3  +----------------------+---------------------+----------------------+
   3  | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+

   The CONNECTED state is entered by the origin Data Link Switch from the
   CONNECT_PENDING state upon the receipt of a CONTACTED message.  The CONNECTED
   state is entered by the target Data Link Switch from the CONTACT_PENDING state

A.K. Bartky                                                  [Page 57]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

   upon the receipt of a DLC_CONTACTED signal.  At this time, the target Data Link
   Switch will return a CONTACTED message to the origin Data Link Switch.

   The CONNECTED state is exited usually under one of two conditions: a DLC_ERROR
   signal received from the DLC (e.g., a DISC command received by the local DLC),
   or a HALT_DL message received from the other Data Link Switch (e.g., a DISC
   command received by the remote DLC).

   A SABME command (i.e., a DLC_RESET signal) received by either Data Link Switch
   will also cause the two Data Link Switches to leave the CONNECTED state and
   eventually restart a new circuit.

     Note:  Some implementations will also send a Test command in order to
     restart the data link to the station that sent the SABME command  (i.e., a
     DLC_START_DL will be issued).

   Following the receipt of a reset signal, the Data Link Switch will send a
   RESTART_DL message to the other Data Link Switch and will enter the
   CIRCUIT_RESTART state.  Upon the receipt of the RESTART_DL message, the remote
   Data Link Switch will send a DISC command (i.e., DLC_HALT_DL signal) and enter
   the RESTART_PENDING state.

4.2.2.9 CIRCUIT_RESTART State

      +----------------------+---------------------+----------------------+
      |        Event         |      Action(s)      |      Next State      |
      +----------------------+---------------------+----------------------+
      | Receive DL_RESTARTED | If Connected:       | If Connected:        |
      |                      |  Send CONTACT       |  CONNECT_PENDING,    |
      |                      |                     | else:                |
      |                      |                     |  CIRCUIT_ESTABLISHED |
      +----------------------+---------------------+----------------------+
   1  | Receive HALT_DL_NOACK| DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+
      | Receive DATAFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
      | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
      +----------------------+---------------------+----------------------+
      | DLC_DGRM             | Send DATAFRAME      |                      |
      +----------------------+---------------------+----------------------+
   3  | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+

   The CIRCUIT_RESTART state is entered if a DLC_RESET signal is received from the
   local DLC.  This was caused by the receipt of a SABME command while a
   connection was currently active.  A DM response will be issued to the SABME
   command and the Data Link Switch will attempt to restart the end-to- end
   circuit.

A.K. Bartky                                                  [Page 58]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

   The CIRCUIT_RESTART state is exited through one of two transitions.  The next
   state depends upon the time the local DLC has reached the contacted state
   (i.e., a DLC_CONTACTED signal is presented) relative to the receipt of the
   DL_RESTARTED message.  This signal is caused by the origin station resending
   the SABME command that initially caused the DATA Link Switch to enter the
   CIRCUIT_RESTART state.  The two cases are as follows:

          1) DL_RESTARTED message received before the DLC_CONTACTED signal-  In
          this case, the CIRCUIT_ESTABLISHED state is entered.

          2) DL_RESTARTED message received after the DLC_CONTACTED signal-  In
          this case, the CONNECT_PENDING state is entered.

4.2.2.10. DISCONNECT_PENDING State

      +----------------------+---------------------+----------------------+
      |        Event         |      Action(s)      |      Next State      |
      +----------------------+---------------------+----------------------+
      | Receive DL_HALTED    |                     | DISCONNECTED         |
      +----------------------+---------------------+----------------------+
      | Receive HALT_DL      | Send DL_HALTED      |                      |
      +----------------------+---------------------+----------------------+
   1  | Receive HALT_DL_NOACK|                     | DISCONNECTED         |
      +----------------------+---------------------+----------------------+
      | Receive DATAFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
      | DLC_DGRM             | Send DATAFRAME      |                      |
      +----------------------+---------------------+----------------------+
   3  | XPORT_FAILURE        |                     | DISCONNECTED         |
      +----------------------+---------------------+----------------------+

   The DISCONNECT_PENDING state is entered when a DLC_ERROR signal is received
   from the local DLC.  Upon receipt of this signal, a HALT message is sent.  Once
   an DL_HALTED message is received, the state is exited, and the Data Link Switch
   enters the DISCONNECTED state.

A.K. Bartky                                                  [Page 59]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

4.2.2.11. RESTART_PENDING State

      +----------------------+---------------------+----------------------+
      |        Event         |      Action(s)      |      Next State      |
      +----------------------+---------------------+----------------------+
   1  | Receive HALT_DL_NOACK|                     | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+
      | Receive DATAFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
      | DLC_DL_HALTED        | Send DL_RESTARTED   | CIRCUIT_ESTABLISHED  |
      +----------------------+---------------------+----------------------+
      | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
      +----------------------+---------------------+----------------------+
      | DLC_DGRM             | Send DATAFRAME      |                      |
      +----------------------+---------------------+----------------------+
   3  | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+

   The RESTART_PENDING state is entered upon the receipt of a RESTART_DL message
   from the remote DLS while the local Data Link Switch is in either the
   CONTACT_PENDING state or the CONNECTED state.  These cause the local DLC to
   issue a DISC command.  Upon the receipt of the UA response (DLC_DL_HALTED), the
   data link is restarted, a DL_RESTARTED message is returned to the remote DLS,
   and the CIRCUIT_ESTABLISHED state is entered.

     Note:  Some implementations will send a Test command in order to restart the
     data link to the target station (i.e., a DLC_START_DL will be issued) prior
     to sending the DL_RESTARTED message.

4.2.2.12 HALT_PENDING State

      +----------------------+---------------------+----------------------+
      |        Event         |      Action(s)      |      Next State      |
      +----------------------+---------------------+----------------------+
   1  | Receive HALT_DL_NOACK|                     | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+
      | Receive DATAFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
      | DLC_DL_HALTED        | Send DL_HALTED      | DISCONNECTED         |
      +----------------------+---------------------+----------------------+
      | DLC_ERROR            | Send DL_HALTED      | DISCONNECTED         |
      +----------------------+---------------------+----------------------+
      | DLC_DGRM             | Send DATAFRAME      |                      |
      +----------------------+---------------------+----------------------+
   3  | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+

   The HALT_PENDING state is entered upon the receipt of a HALT_DL message.  This
   causes the local DLC to issue a DISC command.  Upon the receipt of the UA

A.K. Bartky                                                  [Page 60]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

   response (DLC_DL_HALTED), a DL_HALTED message is returned to the remote DLS and
   the DISCONNECTED state is entered.

4.2.2.13. HALT_PENDING_NOACK State

   1  +----------------------+---------------------+----------------------+
   1  |        Event         |      Action(s)      |      Next State      |
   1  +----------------------+---------------------+----------------------+
   1  | Receive DATAFRAME    | DLC_DGRM            |                      |
   1  +----------------------+---------------------+----------------------+
   1  | DLC_DL_HALTED        |                     | DISCONNECTED         |
   1  +----------------------+---------------------+----------------------+
   1  | DLC_ERROR            |                     | DISCONNECTED         |
   1  +----------------------+---------------------+----------------------+
   1  | DLC_DGRM             | Send DATAFRAME      |                      |
   1  +----------------------+---------------------+----------------------+

A.K. Bartky                                                  [Page 61]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

4.3. NetBIOS Datagrams

   The NetBIOS protocols use a number of UI frames for directory services and the
   transmission of datagrams.  Most of these frames are directed to a group MAC
   address (GA) with the routing information field indicating spanning tree
   explorer (STE).  Two of the frames, NB_Add_Name_Response and
   NB_Status_Response, are directed to a specific MAC address with the routing
   information field indicating a specifically routed frame (SRF).  The handling
   of these frames is summarized in the following table.

   +---------------------------+------------------+--------------------+
   |          Event            |     Action(s)    |      Comment       |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for NETBIOS      | Send NETBIOS_ANQ | Transmitted to all |
   |  group address:           |                  |   remote DLS       |
   |   NB_Add_Name_Query       |                  |                    |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for a specific   | Send NETBIOS_ANR | Transmitted to     |
   |  address:                 |                  |   specific DLS     |
   |   NB_Add_Name_Response    |                  |                    |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for a specific   | Send DATAFRAME   | Transmitted to all |
   |  address:                 |                  |   remote DLS       |
   |   NB_Status_Response      |                  |                    |
   +---------------------------+------------------+--------------------+
   | DLC_DGRM for NETBIOS      | Send DATAFRAME   | Transmitted to all |
   |  group address:           |                  |   remote DLS       |
   |   NB_Name_in_Conflict     |                  |                    |
   |   NB_Add_Group_Name_Query |                  |                    |
   |   NB_Datagram,            |                  |                    |
   |   NB_Datagram_Broadcast   |                  |                    |
   |   NB_Status_Query         |                  |                    |
   |   NB_Terminate_Trace      |                  |                    |
   +---------------------------+------------------+--------------------+

                      Table 5.  NetBIOS DLC Frames

   The above actions do not apply in the following states: CIRCUIT_ESTABLISHED,
   CONTACT_PENDING, CONNECT_PENDING, CONNECTED, and CIRCUIT_PENDING.  The handling
   of the remaining two UI frames used by NetBIOS systems, NB_Name_Query and
   NB_Name_Recognized, are documented as part of the DLS state machine in the
   previous section (i.e., DISCONNECTED and RESOLVE_PENDING states).  Furthermore,
   the handling of NetBIOS datagrams (i.e., NB_Datagram) sent to a specific MAC
   address is also governed by the DLS state machine.

     Note:  Some implementations also issue Test frames during the exchange of the
     NetBIOS, NB_Name_Query and NB_Name_Recognized.  This exchange of protocol
     data units occurs during the start of a data link and is used to determine
     the routing information.  Most other implementations of NetBIOS will use the

A.K. Bartky                                                  [Page 62]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

     NB_Name_Query/NB_Name_Recognized exchange to determine routes in conjunction
     with resolving the NetBIOS names.  These differences are not reflected in the
     SSP protocols.

   The handling of the NetBIOS specific SSP messages is given in the following
   table.

   +---------------+-------------------------+-------------------------+
   |     Event     |        Action(s)        |         Comment         |
   +---------------+-------------------------+-------------------------+
   | NETBIOS_ANQ   | DLC_DGRM:               | Routed STE              |
   |               |    NB_Add_Name_Query    | (NETBIOS Group Address) |
   +---------------+-------------------------+-------------------------+
1  | NETBIOS_ANR   | DLC_DGRM:               | Routed STE              |
   |               |    NB_Add_Name_Response | (Specific MAC Address)  |
   +---------------+-------------------------+-------------------------+
3  | NETBIOS_NQ_ex | DLC_DGRM:               | Routed STE              |
3  |               |    NB_Name_Query        | (NETBIOS Group Address) |
3  +---------------+-------------------------+-------------------------+
3  | NETBIOS_NQ_cs | DLC_DGRM:               | Routed STE              |
   |               |    NB_Name_Query        | (NETBIOS Group Address) |
   +---------------+-------------------------+-------------------------+
3  | NETBIOS_NR_ex | DLC_DGRM:               | Routed SRF              |
3  |               |    NB_Name_Recognized   | (Specific MAC Address)  |
3  +---------------+-------------------------+-------------------------+
3  | NETBIOS_NR_cs | DLC_DGRM:               | Routed SRF              |
   |               |    NB_Name_Recognized   | (Specific MAC Address)  |
   +---------------+-------------------------+-------------------------+
   | DATAFRAME     | DLC_DGRM                | Routed STE              |
   |               |                         | (If NB_Status_Response: |
   |               |                         |   Specific MAC Address  |
   |               |                         |  Else:                  |
   |               |                         |   NETBIOS Group Address)|
   +---------------+-------------------------+-------------------------+

                      Table 6.  NetBIOS SSP Messages

   The above actions apply to all DLS states.  The handling of NetBIOS datagrams
   sent within DGRMFRAME messages is governed by the DLS state machine.  The
   DGRMFRAME message type is employed instead of the DATAFRAME message type once
   the end-to-end circuit has been established.  At that time, the message is
   addressed according to the pair of Circuit IDs in the message header instead of
   relying upon the MAC address information in the token ring header.

A.K. Bartky                                                  [Page 63]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

5. Pacing/Flow Control:

5.1. Basic Overview

   Each session shall consist of two data flows, one in each direction.  Each data
   flow shall have its own independent flow control mechanism.  For each data flow
   there is an entity that originates traffic, referred to as the sender, and a
   target entity which receives the traffic, referred to as the receiver.

   A sender may only send data when its receiver has granted explicit permission
   to send a discreet number of data units.  Data units shall be defined as either
   a DGRMFRAME or an INFOFRAME.

   The receiver shall grant permission to send data units by sending a Flow
   Control Indicator (FCIND - defined later.  The sender must acknowledge all
   FCINDs by sending a Flow Control Acknowledgment (FCACK- defined later).

   A sending implementation must maintain these values:

     1.  GrantedUnits - The number of units (frames) which the sender currently
     has permission to send.

     2.  CurrentWindow - This is a discreet number of units, controlled by the
     receiver, which is basis for granting additional units.

     3.  InitialWindowSize - Global for all circuits on a transport connection.
     Learned in capabilities exchange when the transport connection is
     established.  It specifies an initial value for CurrentWindow when each
     circuit is established.

   A receiving implementation must maintain these values:

     1.  CurrentWindow - This is a discreet number of units, controlled by  the
     receiver, which is basis for granting additional units.

     2.  InitialWindowSize - Global for all circuits on a transport connection.
     Sent in capabilities exchange when the transport connection is established.
     It specifies an initial value for CurrentWindow when each circuit is
     established.

     3.  FCACKOwed - The sender owes an FCACK.  If true, no FCIND may be sent.

A.K. Bartky                                                  [Page 64]RFC XXXX      DLSw: Switch-to-Switch Protocol                June 1994

5.2.Frame Format

   The following diagram describes the relevant header format of a DLSw
   information message (INFOFRAME):

     INFORMATION MESSAGE (16 Bytes) (zero based offsets below shown in decimal
(xx) )
    +--------------------------------+--------------------------------+
    | (00) Version                   | (01) Header Length (= 16)      |
    +--------------------------------+--------------------------------+
    | (02) Message Length                                             |
    +--------------------------------+--------------------------------+
    | (04) Remote Data Link Correlator                                |
    +- - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - -+
    |                                                                 |
    +--------------------------------+--------------------------------+
    | (08) Remote DLC Port ID                                         |
    +- - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - -+
    |                                                                 |
    +--------------------------------+--------------------------------+
    | (12) Reserved                                                   |
    +--------------------------------+--------------------------------+
    | (14) Message Type              | (15) Flow Control Byte         |
    +--------------------------------+--------------------------------+
    |                              Data                               |

   The following diagram describes the relevant header format of a DLSw control
   message (DGRMFRAME):

     CONTROL MESSAGES (72 Bytes) (zero based offsets below shown in decimal (xx) )
    +--------------------------------+--------------------------------+
    | (00)Version Number             | (01) Header Length (= 72)      |
    +--------------------------------+--------------------------------+
    | (02) Message Length                                             |
    +--------------------------------+--------------------------------+
    | (04) Remote Data Link Correlator                                |
    +- - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - -+
    |                                                                 |
    +--------------------------------+--------------------------------+
    | (08) Remote DLC Port ID                                         |
    +- - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - -+
    |                                                                 |
    +--------------------------------+--------------------------------+
    | (12) Reserved Field                                             |
    +--------------------------------+--------------------------------+
    | (14) Message Type              | (15) Flow Control Byte         |
    +--------------------------------+--------------------------------+
    |             Remainder of SSP Control Messag Header              |

A.K. Bartky                                                  [Page 65]